

from django.db import models

# Create your models here.


class Book(models.Model):
    name = models.CharField(max_length=40)
    file = models.FileField(upload_to="bookfiles")


class SingleFile(models.Model):
    file = models.FileField(upload_to="sfiles")


class File(models.Model):
    owner = models.CharField(max_length=60, blank=True, null=True)
    file = models.FileField(upload_to="f")
    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)
    # filesize = models.IntegerField(default=0)
    size = models.IntegerField(default=0)
    # extension = models.CharField(max_length=40, blank=True, null=True)
    # mime = models.CharField(max_length=100, blank=True, null=True)
    content_type = models.CharField(max_length=100, blank=True, null=True)
    filename = models.CharField(max_length=60, blank=True, null=True)


class Lesson(models.Model):
    title = models.CharField(max_length=40)
    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)
